/**
 * Created by fangshufeng on 2017/12/27.
 */

import jsonFormat from 'json-format'

export let MockDataFilter = function (data,error_fuc) {
    try {
        let value = jsonFormat(eval('[' + data + ']')[0], {
            type: 'space',
            size: 2
        });
        error_fuc(null);
        return value;
    }catch (e) {
        error_fuc(e);
        return data;
    }
}